package com.gm.wj.dao;

import com.gm.wj.entity.SysLog;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface SysLogDAO extends JpaRepository<SysLog,Integer> {

    // jpa分页查询  多条件
    Page<SysLog> findAll(Specification<SysLog> specification, Pageable pageable);

    // 首页数据统计
    @Query(value = "select count(*) from sys_log ",nativeQuery = true)
    int countByLog();
}
